import  { http } from '@/utils/http.js'

//获取手机验证码
export const getmobileCMSAPI = (data) => {
	return http.get('/code',{params:data})
}

//手机验证码登录
export const loginByCodeAPI = (data) => {
	return http.post('/login',data)
}

//手机密码登录
export const loginByPasswordAPI = (data) => {
	return http.post('/login/password',data)
}

//获取个人信息
export const getUserInfoAPI = () => {
	return http.get('/patient/myUser')
}

//添加患者
export const addPatientAPI = (data) => {
	return http.post('/patient/add',data)
}

//问诊-查询患者列表信息
export const getPatientListAPI = () => {
	return http.get('/patient/mylist')
}

//删除患者
export const delPatientAPI = (id) => {
	return http.delete(`/patient/del/${id}`)
}

//获取患者详情
export const getPaientDetailAPI = (id) => {
	return http.get(`/patient/info/${id}`)
}

//问诊-编辑患者信息
export const updatePatientAPI = (data) => {
	return http.put('/patient/update',data)
}